<?php
//暂时废弃
class DB
{
    public $dbConn,$pdo;
    public static $_dbInstance = false;
    private function __construct()
    {
        $dbConn = include_once 'conf/config.php';
         try
        { 
        	return new PDO("mysql:host=locahost;dbname=shop;port=3306",'root','123456');
        	//return new PDO("mysql:host={$dbConn['HOST']};dbname={$dbConn['DBNAME']};port={$dbConn['PORT']}",$dbConn['USER'],$dbConn['PASSWORD']);
        }catch(PDOException $e)
        {
            die($e->getMessage());
        }
    }
    public static function dbInstance()
    {
        if(!(self::$_dbInstance instanceof self))
        {
            self::$_dbInstance = new self;
        }
        return self::$_dbInstance;
    }
}